#include <bits/stdc++.h>
using namespace std;
const int inff=1e9+7;
int a[100002],n,s[100002],su[100002];
deque<int>q;
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        scanf("%d",&a[i]);
        s[a[i]]++;
    }
    sort(a+1,a+n+1);
    int o=1,ans=n;
    su[1]=a[1];
    q.push_back(a[1]);
    for(int i=2;i<=n;i++){
        if(a[i]!=su[o]){
            su[++o]=a[i];
            q.push_back(a[i]);
        }
    }
    for(int i=2;i<=o;i++){
        int b=q.front();
        q.pop_front();
        int e=q.front();
        if(s[b]>=s[e]){
            ans-=s[e];
            s[e]=0;
            s[b]-=s[e];
            q.pop_front();
            q.push_front(b);
        }
        else {
            ans-=s[b];
            s[b]=0;
            s[e]-=s[b];
        }
    }
    cout<<ans<<endl;
    return 0;
}
